package com.ruoyi.pcwl.domain;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.Date;
import com.ruoyi.pcwl.utils.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;


/**
 * 评论信息表
 */

@ApiModel("评论信息表")
public class Replay implements Serializable {


	/**
	 * 主键
	 */

	@ApiModelProperty("主键")
	private Long id;

	/**
	 * -1 表示正常回答，其他值表示是回答的回复
	 */

	@ApiModelProperty("-1 表示正常回答，其他值表示是回答的回复")
	private Long parentId;

	/**
	 * 评论者id
	 */

	@ApiModelProperty("评论者id")
	private String userId;

	/**
	 * 评论者用户昵称
	 */

	@ApiModelProperty("评论者用户昵称")
	private String nickName;

	/**
	 * 评论者头像url
	 */

	@ApiModelProperty("评论者头像url")
	private String userImage;

	/**
	 * 主题id
	 */

	@ApiModelProperty(value = "主题id",required = true)
	private String subjectId;

	/**
	 * 回答内容
	 */

	@ApiModelProperty("回答内容")
	private String content;

	/**
	 * 分类ID
	 */

	@ApiModelProperty("分类ID")
	private Long categoryId;

	/**
	 * 分类名称
	 */

	@ApiModelProperty("分类名称")
	private String categoryName;

	/**
	 * 创建时间
	 */

	@ApiModelProperty("创建时间")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createDate;


	public void setId(Long id){
		this.id = id;
	}

	public Long getId(){
		return this.id;
	}

	public void setParentId(Long parentId){
		this.parentId = parentId;
	}

	public Long getParentId(){
		return this.parentId;
	}

	public void setUserId(String userId){
		this.userId = userId;
	}

	public String getUserId(){
		return this.userId;
	}

	public void setNickName(String nickName){
		this.nickName = nickName;
	}

	public String getNickName(){
		return this.nickName;
	}

	public void setUserImage(String userImage){
		this.userImage = userImage;
	}

	public String getUserImage(){
		return this.userImage;
	}

	public void setSubjectId(String subjectId){
		this.subjectId = subjectId;
	}

	public String getSubjectId(){
		return this.subjectId;
	}

	public void setContent(String content){
		this.content = content;
	}

	public String getContent(){
		return this.content;
	}

	public void setCategoryId(Long categoryId){
		this.categoryId = categoryId;
	}

	public Long getCategoryId(){
		return this.categoryId;
	}

	public void setCategoryName(String categoryName){
		this.categoryName = categoryName;
	}

	public String getCategoryName(){
		return this.categoryName;
	}

	public void setCreateDate(Date createDate){
		this.createDate = createDate;
	}

	public Date getCreateDate(){
		return this.createDate;
	}

	@Override
	public String toString (){
		return "主键:"+(id == null ? "空" : id)+"，-1 表示正常回答，其他值表示是回答的回复:"+(parentId == null ? "空" : parentId)+"，评论者id:"+(userId == null ? "空" : userId)+"，评论者用户昵称:"+(nickName == null ? "空" : nickName)+"，评论者头像url:"+(userImage == null ? "空" : userImage)+"，主题id:"+(subjectId == null ? "空" : subjectId)+"，回答内容:"+(content == null ? "空" : content)+"，分类ID:"+(categoryId == null ? "空" : categoryId)+"，分类名称:"+(categoryName == null ? "空" : categoryName)+"，创建时间:"+(createDate == null ? "空" : DateUtil.formatDateTime2String(createDate));
	}
}
